package org.alis.rpc.common.config;

import org.alis.rpc.common.serializer.Serializer;
import org.alis.rpc.common.serializer.alibaba.JsonSerializer;
import org.alis.rpc.common.serializer.protostuff.ProtostuffSerializer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
 * 先使用fastJson
 * rpc 获取配置
 * @author lc
 * @version v1.0.0
 * @date 2020/8/20 15:48
 * @className RpcConfiguration.class
 */
@Configuration
public class RpcConfiguration {

    @Bean(value = "jsonSerializer")
    public Serializer jsonSerializer(){
        return new JsonSerializer();
    }

    @Bean(value = "protostuffSerialzer")
    public Serializer protostuffSerializer(){
        return new ProtostuffSerializer();
    }

}
